﻿@namespace BootstrapBlazor.Components
@inherits BootstrapModuleComponentBase
@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.WinBox/WinBox.razor.js", JSObjectReference = true)]

<CascadingValue Value="CloseAsync" IsFixed="true">
    @foreach (var (key, option) in _cache)
    {
        <template @key="key" id="@option.Id">
            <CascadingValue Value="option" IsFixed="true">
                <div class="bb-winbox-content">
                    @if (option.BodyTemplate != null)
                    {
                        <div class="bb-winbox-body">
                            @option.BodyTemplate
                        </div>
                    }
                    @option.ContentTemplate
                    @if (option.FooterTemplate != null)
                    {
                        <div class="bb-winbox-footer">
                            @option.FooterTemplate
                        </div>
                    }
                </div>
            </CascadingValue>
        </template>
    }
</CascadingValue>
